//用于查看测试系统详细信息的窗口
var testReqCopySystemWin=Ext.create('Ext.window.Window', {
	title:'测试系统详情',
	height: 600,
    width: 800,
    layout: 'fit',
    items: [testSystemTabPanel],
    closeAction: 'hide'// 防止窗体被销毁
});

//用于显示测试需求、计划、执行复制审核记录的批注的窗口
var testCopyChecklogAnnotateWin=Ext.create('Ext.window.Window', {
	title:'审核批注',
	height: 150,
    width: 250,
    layout: 'fit',
    items: [testCopyCheckAnnotatePanel],
    closeAction: 'hide'// 防止窗体被销毁
});

//用于显示给添加组员选择班级成员的grid的win
var chooseClassesMemberAddGroupGridWin=Ext.create('Ext.window.Window', {
	title:'班级学生列表',
	height: 350,
    width: 450,
    layout: 'fit',
    items: [chooseClassesMemberAddGroupGrid],
    closeAction: 'hide',// 防止窗体被销毁
    buttons:[{
		text:'确认',
		itemId:'sureButton',
		listeners:[{
			click:function(){
				var selectArray=chooseClassesMemberCheckBox.getSelection();
				var isExit=false;
				for(var i=0,length=selectArray.length;i<length;i++){
					var exit=groupMemberGridStore.query('userId',selectArray[0].data.id);
					if(exit.length>0){
						isExit=true;
						break;
					}
				}
    			if(isExit)
    				Ext.Msg.alert("Error", "此组员已经存在！");
    			else{
    				var newRecordArray=new Array();
    				Ext.each(selectArray,function(item){
    					var newRecord={
    							userId:item.data.id,
    							userName:item.data.name,
    							isLeader:0
    					};
    					newRecordArray.push(newRecord);
    				});
    				groupMemberGridStore.add(newRecordArray);
    			}
			}
		}]
	}]
});

//用于显示班级负责人的选择Grid的win
var classesChooseClassesLeaderGridWin=Ext.create('Ext.window.Window', {
	title:'选择负责人',
	height: 350,
    width: 450,
    layout: 'fit',
    items: [classesChooseClassesLeaderGrid],
    closeAction: 'hide'// 防止窗体被销毁
});

//用于显示添加班级成员的选择Grid的win
var chooseClassesMemberAddGridWin=Ext.create('Ext.window.Window', {
	title:'添加班级成员',
	height: 350,
    width: 450,
    layout: 'fit',
    items: [chooseClassesMemberAddGrid],
    closeAction: 'hide',// 防止窗体被销毁
    buttons:[{
		text:'确认',
		itemId:'sureButton',
		listeners:[{
			click:function(){
				var selectArray=chooseClassesMemberAddGridCheckBox.getSelection();
				var isExit=false;
				for(var i=0,length=selectArray.length;i<length;i++){
					var exit=classesMemberGridStore.query('id',selectArray[0].data.id);
					if(exit.length>0){
						isExit=true;
						break;
					}
				}
    			if(isExit)
    				Ext.Msg.alert("Error", "此班级成员已经存在！");
    			else{
    				var newRecordArray=new Array();
    				Ext.each(selectArray,function(item){
    					var newRecord={
    							id:item.data.id,
    							name:item.data.realName,
    							groupName:'无'
    					};
    					newRecordArray.push(newRecord);
    				});
    				classesMemberGridStore.add(newRecordArray);
    			}
			}
		}]
	}]
});